package com.orange.off.cloud.cloudoff.adapters;

import android.content.Context;
import android.widget.ImageView;

import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.orange.off.cloud.cloudoff.R;
import com.orange.off.cloud.cloudoff.base.ListBaseAdapter;
import com.orange.off.cloud.cloudoff.base.SuperViewHolder;
import com.orange.off.cloud.cloudoff.model.RealEstate_List_pic_Bean;
import com.orange.off.cloud.cloudoff.utils.Options;


/**
 * 楼盘资源图片adapter
 *
 * @author smile
 */


public class RealEstateImageHorizontalDataAdapter extends ListBaseAdapter<RealEstate_List_pic_Bean> {
    private DisplayImageOptions options;

    public RealEstateImageHorizontalDataAdapter(Context context) {
        super(context);
        options = Options.getListOptions();
    }

    @Override
    public int getLayoutId() {
        return R.layout.layout_goods_related_item;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        RealEstate_List_pic_Bean item = mDataList.get(position);
        ImageView thumbnail = (ImageView) holder.getView(R.id.thumbnail);
        ImageLoader.getInstance().displayImage(item.image, thumbnail, options);
    }
}
